import cv2 as cv
import numpy as np

img = cv.imread('../test_datas/j.png',0)
kernel =np.ones((5,5),np.uint8)

erosion = cv.erode(img,kernel,iterations = 1)

cv.imshow('img',img)
cv.imshow('erosion',erosion)

cv.waitKey(0)
cv.destroyAllWindows()